<template>
  <div class="news-info">
    <van-panel :title="newsinfo.zhaiyao" :status="`阅读${newsinfo.click}次`">
      <div class="content">{{ newsinfo.content }}</div>
    </van-panel>
  </div>
</template>
<script>
import { getNewsInfo } from '@/api/news'
export default {
  props: ['id'],
  data() {
    return {
      newsinfo: {}
    }
  },
  created() {
    this.getNewsInfo()
  },
  methods: {
    async getNewsInfo() {
      const res = await getNewsInfo(this.id)
      this.newsinfo = res.data.message
    }
  }
}
</script>
<style lang="scss" scoped>
.news-info {
  padding: 0 10px;
  // box-sizing: border-box;
  .van-cell__title {
    font-size: 16px;
    font-weight: 600;
  }
  .content {
    text-indent: 2em;
  }
}
</style>